#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:higher-order function.py
# author:wmf
# datetime:2021/4/8 14:21
# software: PyCharm
'''
this is function description
'''
# import module your need

import time

def foo():
    time.sleep(3)
    print('来自foo')

def timer(func):
    start = time.time()
    func()
    end = time.time()
    print("运行时间为:")
    print(end - start)

timer(foo)